<?php
/* SVN FILE: $Id: administration_controller.php 378 2009-11-09 19:39:06Z fbollon $ */
/**
 * Controller for accessing administration ressources
 * 
 * PHP 5
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @filesource
 * @link			http://code.google.com/p/fredistrano
 * @package			app
 * @subpackage		app.controllers
 * @version			$Revision: 378 $
 * @modifiedby		$Author: fbollon $
 * @lastmodified	$Date: 2009-11-09 19:39:06 +0000 (Mon, 09 Nov 2009) $
 * @license			http://www.opensource.org/licenses/mit-license.php The MIT License
 */
/**
 * Controller for accessing administration ressources
 *
 * @package		app
 * @subpackage	app.controllers
 */
class AdministrationController extends AppController {
	
	var $uses = array ('DeploymentLog');

	var $authLocal = array (
		'Administration' => array (
			'administration'
		)
	);
	
	/**
	 * Default action
	 */
	function index() {
		$this->Crumbs->leaf = __('Administration', true);
	}

	/**
	 * Default action
	 */
	function cleanOrphanLogs() {
		$count = $this->DeploymentLog->cleanOrphans();
		
		$this->Session->setFlash(sprintf(__('%d orphan logs have been deleted.', true), $count));
		$this->redirect('/administration');
		exit;
	}// cleanOrphelinsLogs
	
}// Administration
?>